CC = g++
AR = ar cru
SRC = ../../antx/antx/antx.cc  ../../antx/antx/thread.cc ../../antx/antx/exmonwaiter.cc\
 ../../antx/antx/clientAcl.cc  Helper.cc CobwebMql.cc 

CFLAGS = -Wall -D_REENTRANT -D_GNU_SOURCE -fPIC  -g3
SOFLAGS = -shared
LDFLAGS =   # -lresolv

LINKER = $(CC)
LINT = lint -c
RM = /bin/rm -f

LIBS = -L/home/y/lib -L/usr/local/lib -L/usr/lib  \
	    -pthread -lstdc++  -ldl -lrt   -lmemcached -lpq -lmysqlclient

INCLUDES =  -I/home/y/include -I/usr/local/include -I./  -I../../antx/antx -I/usr/include  -I/usr/include -I/home/y/include/pgsql -I/home/y/include/mysql  
STATIC_LIB = /home/y/lib/libevent.a #/home/y/lib/libmemcached.a  /usr/lib/libglib-2.0.a 
 
OPTFLAG =  -D_DEBUG -fno-default-inline -fno-strict-aliasing

CFLAGS  += $(INCLUDES) 
CFLAGS  += $(OPTFLAG) 
LDFLAGS += $(LIBS) 
#--------------------------------------------------------------------
OBJS = $(SRC:.cc=.o)
TARGET = cobwebUIT
#--------------------------------------------------------------------
all:$(TARGET)
$(TARGET):$(OBJS)
	$(LINKER) $(LDFLAGS) $(OPTFLAG) $(OBJS) $(STATIC_LIB) -o $@

clean:
	@( $(RM) *.o vgcore.*  $(TARGET) )
	rm ../../antx/antx/*.o 
#--------------------------------------------------------------------
# make rule
%.o : %.cc
	$(CC) $(CFLAGS) -c $^ -o $@	

%.o : %.cpp
	$(CC) $(CFLAGS) -c $^ -o $@	

